// 产品模块路由
import { name } from "file-loader";
import Layout from "../views/layout/Layout";

export const productRoute = [
  {
    path: "",
    component: Layout,
    redirect: "/productIndex",
    name: "product",
    meta: {
      title: "产品管理",
      icon: "product",
    },
    children: [
      {
        path: "productIndex",
        name: "productIndex",
        component: () => import("@/views/product/index"),
        meta: { title: "产品中心", icon: "ums-admin" },
        hidden: false,
      },
      {
        path: "creatProduct",
        name: "creatProduct",
        component: () => import("@/views/product/creatProduct"),
        meta: { title: "发布产品", icon: "ums-admin" },
        hidden: true,
      },
      {
        path: "productDetail",
        name: "productDetail",
        component: () => import("@/views/product/detail"),
        meta: { title: "产品详情", icon: "ums-admin" },
        hidden: true,
      },
      {
        path: "conditionalIndex",
        name: "conditionalIndex",
        component: () => import("@/views/product/conditional"),
        meta: { title: "条件录入", icon: "ums-admin" },
        hidden: true,
      },
      {
        path: "matchingQuestionnaire",
        name: "matchingQuestionnaire",
        component: () => import("@/views/product/matchingQuestionnaire"),
        meta: { title: "产品匹配问卷", icon: "" },
        hidden: true,
      },

      {
        path: "",
        redirect: "/article/questionIndex",
        name: "questionIndex",
        meta: { title: "" },
        component: () => import("@/views/product/IntelligentService/route"),
        children: [
          {
            path: "article/questionIndex",
            name: "questionIndex",
            component: () =>
              import("@/views/product/IntelligentService/question/index"),
            meta: { title: "" },
          },
          {
            path: "article/anawerIndex",
            name: "answerIndex",
            component: () =>
              import("@/views/product/IntelligentService/answer/index"),
            meta: { title: "" },
            hidden: true,
          },
          {
            path: "article/addAnswer",
            name: "addAnswer",
            component: () =>
              import("@/views/product/IntelligentService/answer/add"),
            meta: { title: "新增问题" },
            hidden: true,
          },
          {
            path: "article/addprsduct",
            name: "addAnswer",
            component: () =>
              import("@/views/product/IntelligentService/answer/addprsduct"),
            meta: { title: "新增问题" },
            hidden: true,
          },
        ],
      },

      {
        path: "",
        redirect: "/enterpriseReport/campanyInfoConfig",
        name: "enterpriseReport",
        meta: { title: "" },
        component: () => import("@/views/product/enterpriseReport/route"),
        children: [
          {
            path: "enterpriseReport/campanyInfoConfig",
            name: "campanyInfoConfig",
            component: () =>
              import("@/views/product/enterpriseReport/campanyInfoConfig"),
            meta: { title: "" },
            hidden: true,
          },
          {
            path: "enterpriseReport/addConfig",
            name: "addConfig",
            component: () => import("@/views/product/enterpriseReport/addConfig"),
            meta: { title: "新增" },
            hidden: true,
          },

        ],
      },
    ],
  },
];
